#include "MovebleSystem.h"
#include "OgreCommon.h"

CMovebleManage* mMovebleManage;

namespace CMovebleSystem
{
	void Inital(CMovebleManage* _movemanage)
	{
		mMovebleManage = _movemanage;
	}

	void capture()
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;

		if (mMovebleManage->getEntitySeld() == MS_ENTITY_SEL)
		{
			mMovebleManage->setMovebleMove();
		}
	}

	void setMovebleManage(CMovebleManage* _movemanage)
	{
		mMovebleManage = _movemanage;
	}

	void injectMouseMove(int _absx, int _absy, int _absz)
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;


	}
	void injectMousePress(int _absx, int _absy, MyGUI::MouseButton _id)
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;

		if (_id == MyGUI::MouseButton::Left)
		{
			if (mMovebleManage->getEntitySeld() == MS_ENTITY_SEL)
			{
				mMovebleManage->setEntityPostion();
			}
			else
			{
				mMovebleManage->getPickMoveble();
			}
		}
	}
	void injectMouseRelease(int _absx, int _absy, MyGUI::MouseButton _id)
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;


	}
	void injectKeyPress(MyGUI::KeyCode _key, MyGUI::Char _text)
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;


	}
	void injectKeyRelease(MyGUI::KeyCode _key)
	{
		if (!mMovebleManage || mMovebleManage->getEditState() == MS_NOEDIT)
			return;


	}
}